#pragma once
#include "openglclass.h"
#include "textureclass.h"
class ObjModelClass {
public:
	ObjModelClass();
	ObjModelClass(const ObjModelClass&);
	~ObjModelClass();
	bool Initialize(OpenGLClass*, char*, unsigned int, bool);
	void Shutdown(OpenGLClass*);
	void Render(OpenGLClass*);

private:
	bool load_obj_file(const char*, float*&, float*&, float*&, int&);
	bool InitializeBuffers(OpenGLClass*);
	void ShutdownBuffers(OpenGLClass*);
	void RenderBuffers(OpenGLClass*);

	bool LoadTexture(OpenGLClass*, char*, unsigned int, bool);
	void ReleaseTexture();

private:
	int m_vertexCount, m_indexCount;
	unsigned int m_vertexArrayId, m_vertexBufferId, m_indexBufferId;
	TextureClass* m_Texture;
};
